.PHONY: proto
proto:
	docker run --rm -v $(PWD):/data -w /data zw2582/golang:v2.1 protoc -I ./ --go_out=./proto/product/ --micro_out=./proto/product/ ./proto/product/product.proto

.PHONY: build
build:
	go build -o user main.go

.PHONY: clean
clean:
	rm -f ./user

.PHONY: docker
docker:
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o user main.go
	docker build -t user:latest .

run:
	docker run --rm --name learn.micro.service.user user:latest
